package com.lm.activiti.boot.cases.objects;

import org.junit.Test;

/**
 * @author lm_jcf
 * @date 2022/2/28 15:55
 */
public class StaticsObjectCase {

    public static class Parent {

        private String name;

        public Parent(String name) {
            this.name = name;
        }
    }


    public static void main(String[] args) {

        Parent p1 = new Parent("得得");
        Parent p2 = new Parent("得得");

        System.out.println(p1.hashCode());
        System.out.println(p2.hashCode());
        
    }


    @Test
    public void cloneClass() throws CloneNotSupportedException {

        ParentObject object = new ParentObject();
        object.setsStr("fulei");

        ParentObject object1 = (ParentObject)object.clone();


        System.out.println(object1.getsStr());


        System.out.println(object.equals(object1));
        System.out.println(object == object1);
    }

}
